<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<form:form action="adicionar-aluno" method="POST" modelAttribute="aluno" class="form-horizontal" id="frmAluno">
	<input type="hidden" name="id" value="${aluno.id}" />
	<fieldset>
   		<legend><h3>Aluno <small> incluir</small></h3></legend>
   		<div class="control-group">
    		<label class="control-label">Nome: </label>
    		<div class="controls">
    			<form:input path="nome" class="input-large" /><form:errors path="nome" cssClass="alert alert-error" />
    		</div>
   		</div>
   	</fieldset>
</form:form>

<div class="control-group form-horizontal">
	<div class="controls">
		<button id="salvar" class="btn btn-success">Salvar</button>
		<a href="/web/listar-alunos"><button class="btn">Cancelar</button></a>
		<c:if test="${not empty param.enableRemove}">
			<button id="excluir" class="btn btn-danger">Excluir</button>
		</c:if>
	</div>
</div>

<script>
$(document).ready(function () {
 	$("#salvar").click(function () { $("#frmAluno").submit(); });
});
</script>